import Taro, { Component } from '@tarojs/taro'
import { View } from '@tarojs/components'
import classNames from 'classnames'
import styles from './index.module.scss'
import { ORDER_TYPE_NAME } from "@/config/types"

interface IProps {
  className: string
  order: any
}

export default class OrderCardHead extends Component<IProps, {}> {
  props: any

  render() {
    const prefixCls = 'order-head'
    const { className, order={} } = this.props
    return (
      <View className={classNames(styles[prefixCls], 'thin-border__b', className)}>
        <View className={styles[`${prefixCls}-left`]}>订单号：{order.id}</View>
        <View className={styles[`${prefixCls}-right`]}>{ORDER_TYPE_NAME[order.status]}</View>
      </View>
    )
  }
}
